ActionController::Routing::Routes.draw do |map|

  map.resource :session
  map.logout '/user/logout', :controller => 'sessions', :action => 'destroy'

  map.users '/users', :controller => 'users', :action => 'index'
  map.user_register '/users/register', :controller => 'users', :action => 'new'
  map.user_create '/users/create', :controller => 'users', :action => 'create'

  map.maps '/maps', :controller => 'maps', :action => 'index'

  map.add_match '/matches/add', :controller => 'matches', :action => 'new'
  map.save_match '/matches/save', :controller => 'matches', :action => 'create'
  map.matches '/matches', :controller => 'matches', :action => 'index'
  map.add_teams '/matches/add_teams/:map', :controller => 'matches', :action => 'add_team'

  #  map.home '/', :controller => "posts", :action => "index"
  map.home '/', :controller => "matches", :action => "index"
  
end
